package myself.study.network.tcp.examples.ex03.multiThread;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
* @Name: FileUploadServer
* @Description: 文件上传服务端——多线程实现
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-1-12 下午9:25:42 
* @Version: V1.0
 */
public class FileUploadServer {
	
	public static void main(String[] args) throws IOException {
		//创建服务端Socket对象
		ServerSocket serverSocket = new ServerSocket(12345) ;
		System.out.println("启动文件上传服务器...");
		while(true) {
			//监听客户端连接
			Socket socket = serverSocket.accept() ; //阻塞
			new Thread(new FileUploadServerRunnable(socket)).start() ;
		}
	}

}














